<?php
    require("../models/webconfig.php");
    require("../models/class.connection.php");
    require("../models/repositories/class.ProductRepository.php");
    $productRepository = new ProductRepository();
    if(isset($_POST['code']))
    { 
        $productCode = $_POST['code'];
    } 
    else 
        exit();
    if($productRepository->Delete($productCode) > 0){
        echo "1";
    }
    else{
        echo "0";
    }
?>